﻿@model IEnumerable<DauGiaApp.Models.SanPham>

@{
    ViewBag.Title = "Danh sách sản phẩm";
}
<link href="@Url.Content("~/Content/style.css")" rel="stylesheet" type="text/css" />
<h2 class="title_hot">Danh sách sản phẩm</h2>

@{
    int soTrang = ViewBag.TongSanPham / DauGiaApp.Models.SanPham.takeView;
    <div id="pager">
    <span><a href="/SanPham/DanhSachPage?from=0">Đầu</a></span>
    @for (int trang = 1; trang < soTrang; trang++)
    {
        <span><a href="/SanPham/DanhSachPage?from=@trang">@trang</a></span>
    }
    
    <span><a href="/SanPham/DanhSachPage?from=@soTrang">Cuối</a></span>
    </div>
}
<div id="dssp" style="clear:both;">

@foreach (var item in Model)
{
    <div class="item_sanpham">        
	    <h1 class="item_tensp"><a href="ChiTiet?id=@item.MaSanPham">@item.TenSanPham</a></h1>
        <div class="khunganh">
	        <img class="anhdaihien" src="../../Content/images/@item.LayAnhDaiDien()" alt="anh" />
        </div>
	    <h1 class="item_giahientai">Giá hiện tại: @item.GiaHienTai VNĐ </h1>
	    <h1 class="item_ngayhethan">Ngày hết hạn: @item.NgayHetHan.ToString()</h1>
	    <h1 class="item_giakhoidiem">Giá khởi điểm: @item.GiaKhoiDiem VNĐ</h1>
	    <a href="#">   <img class="bid_btn" src="../../Content/images/bid_btn.jpg" alt="khoi di"/> </a>	
        @*@Html.ActionLink("Đăng đấu giá","DangDauGia","DauGia",new {MaSanPham= item.MaSanPham},null)*@
    </div>
    
}

</div>   
<br />